<html xmlns="http://www.w3.org/1999/xhtml">
<html>

<form name="CTTMTG" id="CTTMTG" method="post" action="{url nam= $xNam  EditMode = "save" }" onsubmit="return false;">
<div style="width: 100%; border: thin solid #DDDDD0; border-left: none; background-color: 'ivory 3'  ">
<table id= "mymain"  width="100%" align = "left" cellspacing="0" >

<tr valign="top" height= "10px">
	<td width="7%" ></td>
	<td width="10%" ></td>
	<td width="10%" ></td>
	<td width="10%" ></td>
	<td width="10%"></td>
	<td width="10%"></td>
	<td width="10%"></td>
	<td width="10%"></td>
	<td width="10%"></td>
	<td width="10%"></td>
</tr>

<tr valign="top">
	<td colspan = "2"  align = "right"   class="mylabel" ><label for="mact">Mã chứng từ:</label></td>
	<td colspan = "1" class="value" ><input type="text" name="mact" value="{$mact}" id="mact" style="width:70%" class="textField" /></td>

	<td colspan = "2"  align = "right" class="mylabel"><label for="matk">{$lTK}:</label></td>
	<td colspan = "4" class="value" >
	<select name="matk" id="matk" class="selectMenu">
		{html_options options=$tktien|truncate:60 }
	</select>
	</td>

</tr>

<tr valign="center">

	<td colspan = "2" align = "right"  class="mylabel"><label for="ngct">Ng&#224;y ch&#7913;ng t&#7915;:</label></td>
	<td><div style="display:inline" class="value"><input type="text" name="ngct" value="{$ngct}" id="ngct" size="10" maxlength="20"   onblur="return validNgay(this.value, this.id, '{$xNam}')" onkeydown="javascript:if (event.keyCode == 13) document.getElementById('hoten').focus()" class="textField" /></div></td>

	<td colspan = "2" align = "right"  class="mylabel"><label for="ngct">Ng&#224;y lập ch&#7913;ng t&#7915;:</label></td>
	<td><div style="display:inline" class="value"><input type="text" name="ngct" value="{$ngct}" id="ngct" size="10" maxlength="20"   onblur="return validNgay(this.value, this.id, '{$xNam}')" onkeydown="javascript:if (event.keyCode == 13) document.getElementById('hoten').focus()" class="textField" /></div></td>
	<td></td>
	<td colspan = "1" align = "right">Mã tiền tệ:</td>
	<td colspan = "1"><input type="text" name="soct" value="{$soct}" id="soct" style="width:70%" class="textField" /></td>

</tr>


<tr valign="center">
	<td colspan = "2"  align = "right"   class="mylabel" ><label for="soct">S&#7889; ch&#7913;ng t&#7915;:</label></td>
	<td colspan = "1" class="value" ><input type="text" name="soct" value="{$soct}" id="soct" style="width:70%" class="textField" /></td>

	<td colspan = "2" align = "right"   class="mylabel"><label for="solgctg">Mã khách hàng:</label></td><td colspan = "2">
	<select  name="makh" id="makh"  onclick="SetCur(this.id)" onChange="changeMaCTTK(this.id, '{$urlS_getTenDMDV}');" class="selectMenu" style="width:100px">
		{html_options options=$madva selected=""}
	</select></td>	

	<td align = "right"  class="mylabel">Tỷ giá:</td>
	<td class="value"><input type="text" name="tygia" value="{$tigia}" id="tygia" style="text-align:right"   onblur="validTyGia(this.value, this.id)" onkeypress="return isNumberKey(event)" class="textField" />


</tr>

<tr valign="top">
	<td colspan = "2"  align = "right"  class="mylabel"><label for="hoten">Người giao dịch:</label></td>
	<td colspan = "5" class="value"><input type="text" name="hoten" value="{$hoten}" id="hoten" style="width:99%" class="textField" /></td>

	<td align = "right"  class="mylabel">Mã đơn vị:</td>
	<td colspan = "1"><input type="text" name="soct" value="{$soct}" id="soct" style="width:70%" class="textField" /></td>
	<td colspan = "1"></td>
	

</tr>

<tr valign="top">
	<td colspan = "2"   align = "right"  class="mylabel"><label for="diachi">&#272;&#7883;a ch&#7881;:</label></td>
	<td colspan = "5" class="value"><input type="text" name="diachi" value="{$diachi}" id="diachi" class="textField" style="width:99%" /></td>


</tr>

<tr valign="top">
	<td colspan = "2"  align = "right"   class="label"><label for="lydo">Diễn giải chính:</label></td>
	<td colspan = "3" class="value"><input type="text" name="lydo" value="{$lydo}" id="lydo" class="textField" style="width:99%" /></td>

	<td colspan = "2"  align = "right"  class="mylabel">Nội dung (khai thuế):</td>
	<td colspan = "3"><input type="text" name="soct" value="{$soct}" id="soct" style="width:70%" class="textField" /></td>
	<td colspan = "1"></td>
	

</tr>

{if (1 == 2) }
<tr valign="top">
	<td colspan = "2"   align = "right"  class="mylabel"><label for="sotien">S&#7889; ti&#7873;n:</label></td>
	<td colspan = "8" class="value"><input type="text" name="sotienvn" style="text-align:right"   onblur="return addCommas(this.value, this.id)" onkeypress="return isNumberKey(event)" value="{$sotienvn}" id="sotienvn"  size="25" class="textField"/>
	<label for="sotien">{$loaitien}</label>
	</td>
</tr>
{/if}

{*
{if ($loaitk|substr:0:3) == '112' }
<tr valign="top">
	<td colspan = "2"  align = "right" class="mylabel"><label for="madv">M&#227; Ng.H&#224;ng:</label> </td>
	<td colspan = "8"  align = "left" class="mylabel">
	<select name="madv" id="madv"   onChange="changeMaCTTK(this.id, '{$urlS_getTenDMDV}');" class="selectMenu2">
		{html_options options=$madva selected=""}
	</select><div  class="selectMenu" style="font-size:11px; display: inline" ></div> 

	</td>
	
</tr>
{/if}
*}

</table>

{*
<table id = "action">
<td width = "20%">
<td width = "20%">
<td width = "40%">
<td width = "20%" align = "right"><input type="button" id="button_id" value="{translate key="common.save"}"  class="button defaultButton" onClick="InsCTTMTG('{$url}', '{$host}', '{$username}', '{$password}', '{$databaseName}', '{$journalid}', '{$xNam}', '{$loaitien}', '{$mact}', '{$noco}', '{$urlIns}');"> 
<input type="button" class="button defaultButton" value="{translate key="common.cancel"}" class="button" onclick="javascript:close_window();" /></td>
</table>
*}


<table id="myDetail" class = "listing" style="width: 100%; margin: 0 auto">
<thead>
<tr height = "40" class="myheaderrow">
	<th name="tkdu" >{$lTKDU}</th>
	<th name="macttkdu"  >Mã KH</th>
	<th name="diengiai"  >Di&#7877;n gi&#7843;i chi tiết</th>
	<th name="sotienvn" >Phát sinh</th>
	<th name="sotiennt" >Phát sinh ngoại tệ</th>
	<th name="tygiact" >Tỷ giá ghi sổ</th>
	<th name="soctcn" >Số c.từ công nợ gốc</th>
	<th name="ngayctcn" >Ngày c.từ công nợ gốc</th>
	<th name="macp" >Mã chi phí</th>
	<th name="BBB" align="right">{translate key="common.action"}</th>

</tr>
<tr >
</tr>
</thead>


<tr class="mydatarow" rowspan = "2">
	
	<td class="value" style= "vertical-align: top;">
	<select name="tkdu" value="{$tkdu0}" id="tkdu-1" onclick="SetCur(this.id)"  onChange="changeMa(this.id, '{$urlS_getTenDMTK}');" class="selectMenu" style="width:100px">
		{html_options options=$matka selected=$tkdu0}
	</select>
	<div   class="selectMenu" style="font-size:11px" ></div>
	</td>

	<td class="value" style= "vertical-align: top;">
	<select  name="chitiettkdu-1" value="" id="chitiettkdu-1"  onclick="SetCur(this.id)" onChange="changeMaCTTK(this.id, '{$urlS_getTenDMDV}');" class="selectMenu" style="width:100px">
		{html_options options=$madva selected=""}
	</select>
	<div  class="selectMenu" style="font-size:11px" ></div>
	</td>

	<td valign="top" class="value" ><input type="text" name="diengiai" value="" id="diengiai-1"  style="width:99%" onclick="SetCur(this.id)"  class="textField" /></td>



	<td valign="top" class="value"><input type="text" name="sotienvn" size="10" value="" id="sotienvn-1" style="text-align:right"   onclick="SetCur(this.id)" onblur="return validSoTienVN(this.value, this.id,1)" onkeypress="return isNumberKey(event)" class="textField" /></td>

	<td valign="top" class="value"><input size = "10" type="text" name="sotiennt" value="" id="sotiennt-1" style="text-align:right"  onblur="validSoTienNT(this.value, this.id, 0)" onclick="SetCur(this.id)" onkeypress="return isNumberKey(event)" id="sotiennt-1" class="textField" /></td>

	<td valign="top" class="value" ><input type="text" name="diengiai" value="" id="diengiai-1"  style="width:99%" onclick="SetCur(this.id)"  class="textField" /></td>
	<td valign="top" class="value" ><input type="text" name="diengiai" value="" id="diengiai-1"  style="width:99%" onclick="SetCur(this.id)"  class="textField" /></td>
	<td valign="top" class="value" ><input type="text" name="diengiai" value="" id="diengiai-1"  style="width:99%" onclick="SetCur(this.id)"  class="textField" /></td>
	<td valign="top" class="value" ><input type="text" name="diengiai" value="" id="diengiai-1"  style="width:99%" onclick="SetCur(this.id)"  class="textField" /></td>


	<td valign="top" id = 'mytd'>
	<a class="actiondelrow" style="color: black;"  id = "rowdel-1" href="javascript:void(0);" onclick="delerow(this.id,2,0,1);">-X&#243;a d&#242;ng</a>  
	</td>
</tr>

</table>

<table id="myTotal" width = "95%"  style = "margin: 0 auto">
<tr height = "40" valign="center" >

{if ($loaitien) != 'VND' }
	<td width = "10%" style = "font-weight: bold; text-align:left; vertical-align: middle;">
	<a class="action" href="javascript:void(0);" onclick="tinhtongAll(null,2, 0,1,'');">+Tinh lai </a></td>
	<td width = "10%" style = "font-weight: bold; text-align:left; vertical-align: middle;">T&#7893;ng c&#7897;ng:</td>
	<td width = "20%" style = "font-weight: bold; vertical-align: middle;"><label id = "totalNT"></label><u>&nbsp &nbsp </u>{$loaitien}</td>
{else}
	<td width = "10%" style = "font-weight: bold; text-align:left; vertical-align: middle;" width = "10%">T&#7893;ng c&#7897;ng:</td>

{/if}

<td width = "20%" style = "font-weight: bold; vertical-align: middle;"  ><label id = "total"></label><u>&nbsp &nbsp </u>VND </td>
<td width = "20%" align = "right">
<a class="action" href="javascript:void(0);" onclick="addnewrow_add();">+Th&#234;m d&#242;ng</a> 
</td>
</td>
</tr>
</table>
</div>
</form>


</body>
<html>